#ifndef __MY_USART1_H__
#define __MY_USART1_H__

#include "stm32f10x.h"                  // Device header
#include <stdarg.h>
#include <string.h>
#include <stdio.h>

#define U1_RX_SIZE  				 2048
#define U1_RX_MAX  				 	 256
#define NUM  				 				 10


typedef struct{
	uint16_t UxRxCount;
	uint8_t *UxRxDataIN;
	uint8_t *UxRxDataOUT;
	uint8_t *UxRxDataEND;
	uint8_t *UxRxDataSTART;

}UX_CB;




#define USART1_GPIO_PIN_TX   GPIO_Pin_9
#define USART1_GPIO_PIN_RX   GPIO_Pin_10

extern uint8_t U1_RXData[U1_RX_MAX];
extern UX_CB U1_CB;


void My_USART1(uint32_t baudrate);
void u1_printf(char* fmt,...);
void U1_RX_PtrInit(void);
extern void USART_SendByte(USART_TypeDef* USARTx, uint16_t Data);

#endif

